package org.demo.dubbo.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.demo.dubbo.api.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者：lizw <br/>
 * 创建时间：2021/10/08 11:21 <br/>
 */
@RestController
public class DemoConsumerController {

    @DubboReference
    private DemoService demoService;

    @GetMapping("/sayHello")
    public String sayHello(@RequestParam String name) {
        return demoService.sayHello(name);
    }
}

